package com.example.javaRegist;

import com.example.service.HelloService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;

/**
 * Created by Administrator on 2017/1/12 0012.
 */
public class MyConfig {

    /**
     *  这里只是测试使用，没有实际的意义.
     */
    @Bean(name="testHelloService")
    public HelloService filterRegistrationBean(@Qualifier("shanhyB") Shanhy shanhy){

        HelloService helloService = new HelloService();
        shanhy.display();
        // 其它处理代码.
        return helloService;
    }
}
